home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C09 / Evorder.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  410 b   |  21 lines

  1. //: C09:Evorder.cpp
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // Inline evaluation order
  7.  
  8. class Forward {
  9.   int i;
  10. public:
  11.   Forward() : i(0) {}
  12.   // Call to undeclared function:
  13.   int f() const { return g() + 1; }
  14.   int g() const { return i; }
  15. };
  16.  
  17. int main() {
  18.   Forward F;
  19.   F.f();
  20. } ///:~
  21.